package main  
  
import (  
    "pro_server/router"
    "pro_server/utils"
    //"time"

    "github.com/spf13/viper"
)  
  

  
func main() {  
    utils.InitConfig()
	utils.InitMySQL()
	utils.InitRedis()
	//InitTimer()
	r := router.Router()                  // router.Router()
	r.Run(viper.GetString("port.server")) // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
}

// func InitTimer() {
// 	utils.Timer(time.Duration(viper.GetInt("timeout.DelayHeartbeat"))*time.Second, 
// 	time.Duration(viper.GetInt("timeout.HeartbeatHz"))*time.Second, models.CleanConnection, "")
// }